package homework08;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;

public class homework002c {
	private static void bufferedStreamCopyFile(File srcFile,File desFile) throws Exception{
		BufferedInputStream bis=new BufferedInputStream(new FileInputStream(srcFile));
		BufferedOutputStream bos=new BufferedOutputStream(new FileOutputStream(desFile));
		byte[] b=new byte[1024];
		int ch=0;
		while((ch=bis.read())!=-1){
			bos.write(b,0,ch);
		}
		bis.close();
		bos.close();
	}
}
